package com.steakliu.sun.proxy.api;

import com.steakliu.sun.constant.ProxyConstant;
import com.steakliu.sun.proxy.ProxyConfig;
import com.steakliu.sun.spi.annotation.SPI;

/**
 * 功能说明： 代理接口
 * <p>
 * Original @Author: steakliu-刘牌, 2023-01-08  20:23
 * <p>
 * Copyright (C)2020-2022  steakliu All rights reserved.
 */
@SPI(ProxyConstant.JDK)
public interface ProxyFactory {
    /**
     * 创建代理
     * @param clazz
     * @param <T>
     * @return
     */
    <T> T createProxy(Class<T> clazz);

    /**
     * 初始化ObjectFactory
     * @param proxyConfig
     * @param <T>
     */
    default <T> void init(Class<T> clazz, ProxyConfig<T> proxyConfig) throws Exception {}
}
